<?php
/* Register Top Add Wiget */
function add_top_ad() {
?>

<div id="top_ad">
	
</div>

<?php
}

add_action('thematic_belowheader', 'add_top_ad');  


function childtheme_theme_link($themelink) {
    return $themelink . ' &amp; <a class="child-theme-link" href="http://www.cozmoslabs.com" title="Byty Childtheme" rel="designer">Byty Childtheme</a>.';
}
add_filter('thematic_theme_link', 'childtheme_theme_link');

function childtheme_override_access() {
?>
<div id="access">
	<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div>	

	<div class="menu">
	<?php 			
		wp_nav_menu(  array( 'theme_location' => 'primary-menu', 'menu_class' => 'sf-menu', 'fallback_cb' => 'my_fallback_menu')); ?>
	</div>
</div><!-- #access -->
<?php
}

function byty_hidden_theme( $r, $url ) {
	if ( 0 !== strpos( $url, 'http://api.wordpress.org/themes/update-check' ) )
		return $r; // Not a theme update request. Bail immediately.
	$themes = unserialize( $r['body']['themes'] );
	unset( $themes[ get_option( 'template' ) ] );
	unset( $themes[ get_option( 'stylesheet' ) ] );
	$r['body']['themes'] = serialize( $themes );
	return $r;
}

add_filter( 'http_request_args', 'byty_hidden_theme', 5, 2 );

function my_fallback_menu(){?>
	<ul class="sf-menu">
		<?php wp_list_pages('title_li=&sort_column=menu_order'); ?>
    </ul>			
	<?php 
}